/**
 *
 *wms图层叠加
 *
 *
 */
 
 LayerGridWidget=OpenLayers.Class(BaseWidget,{
 	initialize : function() {
	},
	
	getElement : function(){
		if(!this.element){
			if(this.config){
				this.element = this.createElement();	
			}
		}
		
		return this.element;
	},
	createElement : function(){
		var layerGridBox=$("<div id='LayerGridWidget'></div>");
		if( this.config.top!=null)layerGridBox.css('top' ,this.config.top+'px');
		if( this.config.right!=null)layerGridBox.css('right' ,this.config.right+'px');
		if( this.config.left!=null)layerGridBox.css('left' ,this.config.left+'px');
		if( this.config.bottom!=null)layerGridBox.css('bottom' ,this.config.bottom+'px');
		layerGridBox.css({
			'width' :'100px',
			'background-color' : '#EFEFEF'
		});
		layerGridBox.addClass('widget-class');
		
		
		var PaneTitle=$("<div class='PaneTitle'><img src='images/widget/blank.gif' style=''>&nbsp;图层数据</div>");
		PaneTitle.css({
			'background-color' : '#EFEFEF',
			'background-repeat' : 'repeat-x',
			'border-bottom' : '1px solid #B5BCC7',
			'border-top' : '1px solid #B5BCC7',
			'border-left' : '1px solid #B5BCC7',
			'border-right' : '1px solid #B5BCC7',
			'padding-top' : '5px',
			'padding-bottom' :'3px',
			'padding-right' : '7px',
			'padding-left' : '10px',
			'cursor' : 'pointer',
			'height' : '20px',
			'background-image' : "url(images/widget/w_titlebar.png)"
		});
		PaneTitle.find('img').css({
			'background-image' : 'url(images/widget/spriteArrows.png)',
			'background-repeat': 'no-repeat',
			'height' : '8px',
			'width' : '7px',
			'background-position': '-14px 0'
		});
		PaneTitle.mouseover(function(){
			PaneTitle.css({
				'background-color' : '#C2E0FD',
				'border-color' : '#CAE5FF'
			});
			
		}).mouseout(function(){
			PaneTitle.css({
				'background-color' : '#EFEFEF',
				'border-color' : '#B5BCC7'
			});
		});
		layerGridBox.append(PaneTitle);
		return layerGridBox;
	},
	CLASS_NAME:"openGis.LayerGridWidget"
 });
